package xq.gwt.mvc.controller;

import xq.gwt.mvc.model.FloatPropertyModel;
import xq.gwt.mvc.view.FloatPropertyView;

public class FloatPropertyController extends AbstractPropertyController {

	protected FloatPropertyModel floatModel;
	protected FloatPropertyView floatView;
	
	public FloatPropertyController(FloatPropertyView floatView){
		super(floatView);
		this.floatView = floatView;
	}
	

    public void setPropertyModel(FloatPropertyModel floatModel){
        this.floatModel = floatModel;
        super.setPropertyModel(floatModel);        
    }
	
	
	@Override
	public void updateModel() {
		if (floatModel != null)
			floatModel.setValue(floatView.getFloat());

	}

	@Override
	public void updateView() {
		if (floatView != null)
			floatView.setFloat(floatModel.getValue());

	}

}
